package com.study.demo_wrapper.converts;

import com.study.demo_wrapper.entities.TestEntity;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

/**
 * @Name: MyConvert
 * @Description: java类作用描述
 * @Author: yn
 * @CreateDate: 2022/9/14 10:38
 * @Remark: 特殊说明
 * @Version: 1.0
 */
@Component
public class MyConvert implements Converter<String, TestEntity> {
	/**
	 * @param source
	 * @return
	 */
	@Override
	public TestEntity convert(String source) {
		TestEntity testEntity = new TestEntity();
		testEntity.setName(source);
		return testEntity;
	}
}
